import BasicLayout from '@/layouts/basic-layout';

const meta = {
    auth: true
};

const pre = 'dashboard-';

export default {
    path: '/dashboard',
    name: 'dashboard',
    redirect: {
        name: `${pre}todoList`
    },
    meta,
    component: BasicLayout,
    children: [
        {
            path: 'todoList',
            name: `${pre}todoList`,
            meta: {
                ...meta,
                auth: ['admin'],
                title: '待办事项'
            },
            component: () => import('@/pages/dashboard/todoList')
        },
        {
            path: 'myReport',
            name: `${pre}myReport`,
            meta: {
                ...meta,
                title: '我的报表'
            },
            component: () => import('@/pages/dashboard/myReport')
        },
        {
            path: 'nurseTodoList',
            name: `${pre}nurseTodoList`,
            meta: {
                ...meta,
                auth: ['admin'],
                title: '护士待办'
            },
            component: () => import('@/pages/dashboard/nurseTodoList')
        },
        {
            path: 'nurseReport',
            name: `${pre}nurseReport`,
            meta: {
                ...meta,
                title: '护士报表'
            },
            component: () => import('@/pages/dashboard/nurseReport')
        }
    ]
};
